<?php

namespace app\http\middleware;

use think\facade\Cache;
use app\facade\Redis;

class Safety
{
    use \traits\controller\Jump;

    public function handle($request, \Closure $next)
    {
        $ip = $request->ip();
        $url = $request->baseUrl();
        $limit = config('auth.limit');
        if (in_array($ip, $limit)) {
            $this->result(null, 404, language('base.error'));
        }
        return $next($request);
    }
}